package com.duruikang.LeaveAPI.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.duruikang.LeaveAPI.dao.LogicDao;
import com.duruikang.LeaveAPI.entity.ExamineLogic;
import com.duruikang.LeaveAPI.service.LogicService;
import org.springframework.stereotype.Service;

/**
 * @author szh
 */
@Service
public class LogicServiceImpl extends ServiceImpl<LogicDao, ExamineLogic> implements LogicService {
    @Override
    public int getNewState(int type, int oldState, int operation) {
        return query().eq("type", type).eq("old_state", oldState).eq("operation", operation).one().getNewState();
    }
}
